package com.sgb.kjwl.view.ui.adapter.home;

import android.content.Context;

import com.sgb.kjwl.BR;
import com.sgb.kjwl.R;
import com.swgk.core.view.entity.MenuEntity;
import com.sgb.kjwl.view.widget.TabView;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;

import java.util.List;

public class BottomMeumAdapter extends BaseRecycleAdapter<MenuEntity> {
    public BottomMeumAdapter(Context context, List<MenuEntity> datas) {
        super(context, R.layout.item_bottom_meum, datas);
    }

    @Override
    public void convert(ItemViewHolder holder, final MenuEntity entity) {
        holder.setBinding(BR.viewModel, null);
    }

    @Override
    public void onBindViewHolder(ItemViewHolder holder, int position) {
        super.onBindViewHolder(holder, position);
       TabView tab = holder.getItem().findViewById(R.id.itme_tab);
       tab.setNameAndIcon(datas.get(position).getName(),datas.get(position).getImageResource());
    }
}